<div class="form">
    <?php
    /** @var CatalogController $this */
    /** @var Catalog $model */
    /** @var AweActiveForm $form */
    $form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
        'id' => 'catalog-form',
        'id' => 'horizontalForm',
        'type' => 'horizontal',
        'enableAjaxValidation' => true,
        'enableClientValidation' => false,
    )); ?>

    <p class="note">
        <?php echo Yii::t('AweCrud.app', 'Fields with') ?> <span class="required">*</span>
        <?php echo Yii::t('AweCrud.app', 'are required') ?>. </p>

    <?php echo $form->errorSummary($model) ?>

    <?php echo $form->textFieldRow($model, 'catalog_name', array('class' => 'span5', 'maxlength' => 50)) ?>
    <?php echo $form->textFieldRow($model, 'sort_id', array('class' => 'span5')) ?>
    <?php echo $form->textFieldRow($model, 'slug', array('class' => 'span5')) ?>
    <?php echo $form->dropDownListRow($model, 'parent_id', CHtml::listData(Catalog::model()->findAll(), 'id', Catalog::representingColumn()), array('prompt' => Yii::t('AweApp', 'None'))) ?>
    <?php echo $form->toggleButtonRow($model, 'is_active'); ?>
    <div class="form-actions">
        <?php $this->widget('bootstrap.widgets.TbButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
        )); ?>
        <?php $this->widget('bootstrap.widgets.TbButton', array(
            //'buttonType'=>'submit',
            'label' => Yii::t('AweCrud.app', 'Cancel'),
            'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
        )); ?>
    </div>

    <?php $this->endWidget(); ?>
</div>